<%-- 
    Document   : index
    Created on : 8 avr. 2012, 17:03:33
    Author     : Cranberry
--%>
<%@page language="java" session="true" %>
<%@page import="java.util.List"%>
<%@page import="bmg.Category"%>
<%@page import="bmg.Product"%>
<%@page import="model.ShoppingCart"%>
<%@page import="model.Order"%>
<%@page contentType="text/html" pageEncoding="UTF-8"%>

<jsp:include page="inc/header.jsp">
    <jsp:param name="title" value="Categorie niania" />
</jsp:include>

<% ShoppingCart cart = (ShoppingCart) session.getAttribute("cart"); %>
<%= cart.getCustomer().getFirstName().getValue() %>


<div class="ym-col1">
    
    <div class="ym-cbox">
        
        <div class="box info">
        </div>
        
        <table>
            <thead>
                <tr>
                    <th>N°</th>
                    <th>Nom</th>
                    <th>Prix</th>
                    <th>Quantité</th>
                </tr>
            </thead>
            <% for(Order order : cart.getOrders()){ %>
            <tr>
                <td><%= order.getProduct().getID() %></td>
                <td><%= order.getProduct().getName().getValue() %></td>
                <td><%= order.getProduct().getPrice() %></td>
                <td><%= order.getQuantity() %></td>
            </tr>
            <% } %>
            <tr>
                <td colspan="4" style="text-align: right">Total :</td>
            </tr>
        </table>
            
        
        <p>
            <button class="ym-button ym-next" onclick="self.location.href='?action=order'">Passer commande</button>
        </p>
    </div>    
        
</div>
        
<jsp:include page="menu.jsp" />      
        
<jsp:include page="inc/footer.jsp" />